import 'dart:ui';

import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart';

import 'lan_config.dart';

class MyTranslation extends Translations {
  // 代理
  static const localizationsDelegates = [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
  ];

  // 默认语言
  static const Locale defaultLocal = Locale('en', 'US');

  // 支持的语言
  static List<Locale> supportedLang = LanConfig.supportedLocales;

  @override
  Map<String, Map<String, String>> get keys {
    var lanMap = LanConfig.languageMap;
    //todo 处理在线翻译
    return lanMap;
  }

  /// 保存语言数据
  static saveLanguageData() {

  }

  /// 获取语言数据
  static getLanguageData() {

  }
}
